package cas.ihep.pwa.entity;

import java.util.Arrays;

public class ComputeResultMc extends ComputeResult {

    public double msig[];

    public ComputeResultMc(){}

    public ComputeResultMc(double t,double a,double m[]){
        super(t,a);
        msig=m;
    }

    public ComputeResultMc add(ComputeResultMc other){
        ComputeResultMc ret=new ComputeResultMc();
        ret.totalAmpSquare=totalAmpSquare+other.totalAmpSquare;
        ret.Amps=Amps+other.Amps;
        ret.msig= Arrays.copyOf(msig,msig.length);
        for(int i=0;i<ret.msig.length;i++){
            ret.msig[i]+=other.msig[i];
        }
        return ret;
    }
}
